home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libc6-i686.postinst < prev    next >
Encoding:
Text File  |  2009-08-31  |  1.9 KB  |  63 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. if [ "$1" = "configure" ]
  6. then
  7.     # /etc/ld.so.nohwcap code: NOHWCAP
  8.     # Handle upgrades when libc-opt package has been installed.
  9.     # When a /etc/ld.so.nohwcap file exists, ld.so only use libraries
  10.     # from /lib, and ignore all optimised libraries. This file is
  11.     # inconditionaly created in the preinst script of libc.
  12.  
  13.     # Get the list of optimized packages for a given architecture
  14.     # Before removing a package from this list, make sure it appears
  15.     # in the Conflicts: line of libc.
  16.     case $(dpkg --print-architecture) in
  17.         alpha)
  18.             hwcappkgs="libc6-alphaev67"
  19.             ;;
  20.         armel)
  21.             hwcappkgs="libc6-vfp"
  22.             ;;
  23.         i386)
  24.             hwcappkgs="libc6-i686 libc6-xen"
  25.             ;;
  26.         kfreebsd-i386)
  27.             hwcappkgs="libc0.1-i686"
  28.             ;;
  29.         sparc)
  30.             hwcappkgs="libc6-sparcv9 libc6-sparcv9b libc6-sparcv9v libc6-sparcv9v2 libc6-sparc64b libc6-sparc64v libc6-sparc64v2"
  31.             ;;
  32.     esac
  33.  
  34.     # We check the version between the current installed libc and
  35.     # all optimized packages (on architectures where such packages
  36.     # exists).
  37.     all_upgraded=yes
  38.     if [ -n "$hwcappkgs" ]; then
  39.         for pkg in $hwcappkgs ; do
  40.             ver=$(dpkg -l $pkg 2>/dev/null | sed -e '/^i/!d;' -e "s/^i.\s\+$pkg\s\+//;s/\s.*//g")
  41.             if [ -n "$ver" ] && [ "$ver" != "2.9-4ubuntu6.1" ]; then
  42.                 all_upgraded=no
  43.             fi
  44.         done
  45.     fi
  46.  
  47.     # If the versions of all optimized packages are the same as the libc
  48.     # one, we could remove /etc/ld.so.nohwcap. Otherwise, it will be removed
  49.     # when all optimized packages are upgraded or removed.
  50.     if [ "$all_upgraded" = yes ] ; then
  51.         rm -f /etc/ld.so.nohwcap
  52.     fi
  53. fi
  54.  
  55. # Automatically added by dh_makeshlibs
  56. if [ "$1" = "configure" ]; then
  57.     ldconfig
  58. fi
  59. # End automatically added section
  60.  
  61.  
  62. exit 0
  63.